package com.hqbzl.c1.volatiles;

public class TestInst {
    private volatile Object object = null;

    public static void main(String[] args) {

    }

    public Object getInst() {
        if (object == null) {
            synchronized (this) {
                if (object == null) {
                    return new Object();
                }
            }
        }
        return object;
    }
}
